package com.ftg.learn.chapter8.pattern.singleton.thread;

/**
 * 第二种
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/8/2 上午10:49
 */
public class Thread02 implements Runnable {

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("==>" + Thread.currentThread().getName() + "===><== " + i);
        }
    }

    public static void main(String[] args) {
        Thread02 t2 = new Thread02();
        new Thread(t2).start();
        new Thread(t2).start();
    }

}
